abstract class Scene extends egret.DisplayObjectContainer{
	public constructor() {
		super();
		this.addEventListener(egret.Event.ADDED_TO_STAGE,this.onadd,this);
		this.removeEventListener(egret.Event.REMOVED_FROM_STAGE,this.onRemove,this);
	}
	protected abstract onadd();
	protected abstract onRemove();

	protected shezhi(text:string,x:number,y:number,w:number,h:number,bgcolor:number,tf:boolean,cb?:()=>void){
		let t:egret.TextField = new egret.TextField();
		t.text = text;
		t.x = x;
		t.y = y;
		t.width = w;
		t.height = h;
		t.textAlign = egret.HorizontalAlign.CENTER;
		t.verticalAlign = egret.VerticalAlign.MIDDLE;
		t.background = true;
		t.backgroundColor = bgcolor;

		t.touchEnabled = tf;
		if(tf){
		t.addEventListener(egret.TouchEvent.TOUCH_TAP,cb,this);
		}
		return t;
	}
}